package net.handler
{

	import globals.Global;

	import net.message.BaseMessage;
	import net.message.GC_Loading_RoleMessage;

	import ui.face.ScoreFace;
	import ui.face.UserFace;

	public class GC_Loading_RoleHandler implements IMessageHandler
	{

		public function GC_Loading_RoleHandler()
		{
		}

		public function execute(message:BaseMessage):void
		{
			var msg:GC_Loading_RoleMessage = message as GC_Loading_RoleMessage;

			var userFace:UserFace = Global.uiManager.userFace;
			userFace.updateName(msg.username);
			userFace.updateLevel(msg.level);
			userFace.updateExp(msg.exp, 100000); //在模板里

			var scoreFace:ScoreFace = Global.uiManager.scoreFace;
			scoreFace.updateGold(msg.gold);
			scoreFace.updateSilver(msg.silver);
			scoreFace.updateBadge(msg.exploit);
			scoreFace.updateWave(msg.waveId);
			scoreFace.updateMapName(msg.mapId);
		}
	}
}